import './dlg-goto.css';
import { Dialog } from '../dlg/dlg.js';
export class GotoDialog extends Dialog {
  constructor() {
    super();
    this.#init();

    this.#$btnCancel.onclick = this.#onClose.bind(this);
    
  }
  #init(){
    this.$ = this.querySelector;
    this.decorate(this.#html,'转到指定行');

    this.#$btnCancel = this.$('.cancel');
     }
  #onClose() { 
      this.remove();
  }
  #$btnCancel = null;
  #$btnGoto = null;
   
  #html = ''
      + '<label for="">行号(L):</label><br>'
      + '<input type="text" class="line-number"><br>'
      + '<input type="button" value="转到" class="goto">'
      + '<input type="button" value="取消" class="cancel">';
}

